package com.beerandjesus.sportofkings.handicapper.model.brisnet.singlefile;

/**
 * Date: 6/7/13
 * Time: 6:32 PM
 */
public enum KeyTrainerStatisticsCategory {
    STAT_1ST_TIME_CLMG("1st Time Clmg", "1st time clm"),
    STAT_1ST_AFTER_CLM("1st after clm", "1st aftr clm"),
    STAT_1ST_AT_ROUTE("1st at route", "1st rte"),
    STAT_1ST_ON_GRASS("1st on grass", "1st grs"),
    STAT_1ST_START_W_TRN("1st start w/trn", "1st w/trn"),
    STAT_1ST_TIME_STR("1st time str", "1st time str"),
    STAT_1STTIMEBLINKERS("1stTimeBlinkers", "1st blnkrs"),
    STAT_2ND_RTE_RACE("2nd Rte race", "2nd rte"),
    STAT_2ND_AFTER_CLM("2nd after clm", "2nd aftr clm"),
    STAT_2ND_CAREER_RACE("2nd career race", "2nd race"),
    STAT_2ND_GRASS_RACE("2nd grass race", "2nd grs"),
    STAT_2ND_OFF_LAYOFF("2nd off layoff", "2nd aftr layf"),
    STAT_2ND_STRT_W_TRN("2nd strt w/trn", "2nd w/trn"),
    STAT_3RD_OFF_LAYOFF("3rd off layoff", "3rd aftr lyf"),
    STAT_46_90DAYSAWAY("46-90daysAway", "46-90dys awy"),
    STAT_90PLUS_DAYS_AWAY("90+ days away", "90+dys awy"),
    STAT_AW_TO_TURF("AW to Turf", "AW to trf"),
    STAT_ALL_WEATHER("All Weather", "AllWthr"),
    STAT_ALLOWANCE("Allowance", "Allwnc"),
    STAT_BLINKERS_OFF("Blinkers off", "Blnkrs off"),
    STAT_BLNKR_BACK_ON("Blnkr back on", "Blnkrs bck on"),
    STAT_BTN_FAVORITE("Btn favorite", "Btn fav"),
    STAT_CLAIMING("Claiming", "Claiming"),
    STAT_CLM_REPEATER("Clm repeater", "Clm rptr"),
    STAT_DEBUT_MDN_CLM("Debut Mdn Clm", "Debut mdn clm"),
    STAT_DIRT_TO_AW("Dirt to AW", "Drt to AW"),
    STAT_DIRT_TO_TURF("Dirt to Turf", "Drt to trf"),
    STAT_DIRT_STARTS("Dirt starts", "Drt starts"),
    STAT_DOWN_2PLUS_CLASSES("Down 2+ classes", "Dwn 2+ cls"),
    STAT_DOWN_ONE_CLASS("Down one class", "Dwn 1 cls"),
    STAT_GRADED_STAKES("Graded Stakes", "Grd stks"),
    STAT_MAIDEN_CLMING("Maiden Clming", "Md claiming"),
    STAT_MAIDEN_SP_WT("Maiden Sp Wt", "Md sp wt"),
    STAT_MDN_TO_MDNCLM("Mdn to MdnClm", "Mdn to mdn clm"),
    STAT_MDN_WIN_L_R("Mdn win L/R", "Mdn win L/R"),
    STAT_MDNCLM_TO_MDN("MdnClm to Mdn", "Mdn clm to mdn"),
    STAT_NO_CLASS_CHG("No Class Chg", "No cls chg"),
    STAT_ROUTES("Routes", "Rts"),
    STAT_RTE_TO_SPRINT("Rte to Sprint", "Rt to sprnt"),
    STAT_SHIPPER("Shipper", "Shippr"),
    STAT_SPRINT_TO_RTE("Sprint to Rte", "Sprnt to rt"),
    STAT_SPRINTS("Sprints", "Sprnts"),
    STAT_SPRNT_RTE_SPRNT("Sprnt-Rte-Sprnt", "Sprnt-rt-sprnt"),
    STAT_TURF_STARTS("Turf starts", "Trf strts"),
    STAT_TURF_TO_AW("Turf to AW", "Turf to AW"),
    STAT_UP_ONE_CLASS("Up one class", ""),
    STAT_WNR_LAST_RACE("Wnr last race", "Wnr last"),
    STAT_UNKNOWN("Unknown", "unk");

    private String code;
    private String display;

    private KeyTrainerStatisticsCategory(String code, String display) {
        this.code = code;
        this.display = display;
    }

    public String getCode() {
        return code;
    }

    public static KeyTrainerStatisticsCategory fromCode(String code) {
        for (KeyTrainerStatisticsCategory cat : values()) {
            if (cat.code.equals(code)) {
                return cat;
            }
        }
        return STAT_UNKNOWN;
    }

    public String getDisplay() {
        return display;
    }
}
